
<%@ page import="net.loststone.Todo" %>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="layout" content="main" />
  <g:set var="entityName" value="${message(code: 'todo.label', default: 'Todo')}" />
  <title><g:message code="default.list.label" args="[entityName]" /></title>
</head>
<body>
  <div class="body">
    <h1>Lo que viene...</h1>
   
    <div class="list">
      <table>
        <tbody>
        <g:each in="${todoInstanceList}" status="i" var="todoInstance">
          <g:set var="done" value="${fieldValue(bean: todoInstance, field: 'done')}" />
          <tr>
          <td>
            ${todoInstance.name}
          </td>
          <td>
            ${todoInstance.description}
          </td>
          <td>
            <g:if test="${todoInstance.done == true}">
              <img src="${createLinkTo(dir: 'images', file: 'Circle_Green.png')}"
            </g:if>
            <g:else>
              <img src="${createLinkTo(dir: 'images', file: 'Circle_Red.png')}"
            </g:else>
          </td>
          </tr>
        </g:each>
      </tbody>
      </table>
    </div>
  </div>
</body>
</html>
